<template>
  <view class="page1">
    <view class="scroll-main scroll-0">
      <template>
        <view v-for="(item, index) in list" :key="index" class="item">
          <view class="user" @click="goCheck(item)">
            <view
              @click.prevent.stop="
                go('/pages/my/homeCenter/taHome?id=' + item.other_uid)
              "
            >
              <u-avatar
                :src="item.avatar"
                mode="aspectFill"
                size="104rpx"
              ></u-avatar>
            </view>
            <view class="info">
              <view class="name">{{ item.uername }}</view>
              <view class="text flex_align">
                <template v-if="item.type == 1">评论了你的提问</template>
                <template v-if="item.type == 9">评论了你的评论</template>
                <template v-if="item.type == 11">评论了你的话题</template>
                <view class="time">
                  {{ item.updatetime }}
                </view>
              </view>
            </view>
          </view>
          <view class="content" @click="goCheck(item)">
            {{ item.comment_title }}
          </view>
        </view>
      </template>

      <view class="empty" v-if="list.length == 0 && isLoading == false">
        <u-empty
          text="暂无评论"
          width="200"
          icon="/static/img/empty.png"
          textColor="#999"
        >
        </u-empty>
      </view>
    </view>
  </view>
</template>

<script
  type="text/javascript"
  src="plus-confusion://../pages/message/comment/index"
></script>

<style lang="scss" scoped>
.page1 {
  background: #fff !important;
  height: 100%;
}

page {
  background: #fff !important;
}

.scroll-main {
  border-top: 1rpx solid #e5e5e5;
  height: 100%;
}

.scroll-0 {
  .item {
    padding: 30rpx;
    margin-top: 20rpx;
    border-bottom: 2rpx solid #dedede;

    .content {
      font-size: 32rpx;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      color: #333333;
      line-height: 40rpx;
      padding: 35rpx 0 20rpx 0;
    }

    .time {
      margin-left: 20rpx;
      font-size: 24rpx;
      font-family: MiSans-Normal, MiSans;
      color: #b8b8b8;
    }
  }
}

.user {
  display: flex;
  align-items: center;

  .info {
    padding-left: 21rpx;

    .name {
      font-size: 30rpx;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      color: #333333;
    }

    .text {
      margin-top: 20rpx;
      font-size: 28rpx;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      color: #999999;
    }
  }
}

.line {
  height: 15rpx;
  background: #f3f3f3;
}

/deep/.u-empty__text {
  margin-top: -100rpx;
}

.empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -150%);
}
</style>
